<?php

declare(strict_types=1);

namespace App\Model\User;

use Hyperf\DbConnection\Model\Model;

/**
 * @property int $id 
 * @property string $nickname 昵称
 * @property string $avatar 头像
 * @property string $mobile  手机
 * @property string $password 密码
 * @property int $user_type  用户类型
 * @property string $ip ip
 * @property int $status 状态:1正常,2禁用
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class User extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'User';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [
        'id',
        'nickname',
        'avatar',
        'mobile',
        'password',
        'user_type',
        'ip',
        'status',
    ];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'user_type' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
